home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1999 #2
/
Amiga Plus CD - 1999 - No. 2.iso
/
System-Boost
/
Workbench
/
Archive
/
PPCxDMS
/
src
/
getbits.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-06-18
|
632b
|
34 lines
/*
* xDMS v1.1 - Portable DMS archive unpacker - Public Domain
* Written by Andre R. de la Rocha <adlroc@usa.net>
* Functions/macros to get a variable number of bits
*
*/
#include "cdata.h"
#include "getbits.h"
ULONG mask_bits[]={
0x000000,0x000001,0x000003,0x000007,0x00000f,0x00001f,
0x00003f,0x00007f,0x0000ff,0x0001ff,0x0003ff,0x0007ff,
0x000fff,0x001fff,0x003fff,0x007fff,0x00ffff,0x01ffff,
0x03ffff,0x07ffff,0x0fffff,0x1fffff,0x3fffff,0x7fffff,
0xffffff};
UCHAR *indata, bitcount;
ULONG bitbuf;
void initbitbuf(UCHAR *in){
bitbuf = 0;
bitcount = 0;
indata = in;
DROPBITS(0);
}